package com.dto;

public class Person {


   private static  int count = 0;

    int id;
   public  String name;
   public   int age;

   public Person(){

       id = ++count;
   }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public static void main(String[] args) {

        Person p1 = new Person();
        p1.name="张三";
        p1.age=12;

        Person p2 = new Person();
        p2.name = "李四";
        p2.age = 14;

        System.out.println(p1);
        System.out.println(p2);

        System.out.println("主分支master");
    }

}
